from PyInstaller.utils.hooks import collect_dynamic_libs, collect_data_files, collect_submodules

hiddenimports = ['paddle',
                'paddleocr',
                'paddleocr.tools',
                'paddleocr.ppocr',
                'Cython',
                'imgaug',
                'pyclipper']

 

hiddenimports += collect_submodules('paddleocr')

binaries = collect_dynamic_libs('paddle')+collect_dynamic_libs('Cython')

datas = collect_data_files('paddle')\
    +collect_data_files('paddleocr', True)\
        +collect_data_files('Cython')